home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Hot Mix 17
/
Hot Mix 17.iso
/
HM17_SGI
/
research
/
examples
/
doc
/
widget2.pro
< prev
next >
Wrap
Text File
|
1997-07-08
|
751b
|
24 lines
; This program is used as an example in the "Widgets"
; chapter of the _Using IDL_ manual.
;
PRO widget2_event, ev
WIDGET_CONTROL, ev.top, GET_UVALUE=textwid
WIDGET_CONTROL, ev.id, GET_UVALUE=uval
CASE uval OF
'ONE' : WIDGET_CONTROL, textwid, SET_VALUE='Button One Pressed'
'TWO' : WIDGET_CONTROL, textwid, SET_VALUE='Button Two Pressed'
'DONE': WIDGET_CONTROL, ev.top, /DESTROY
ENDCASE
END
PRO widget2
base = WIDGET_BASE(/COLUMN)
button1 = WIDGET_BUTTON(base, VALUE='One', UVALUE='ONE')
button2 = WIDGET_BUTTON(base, VALUE='Two', UVALUE='TWO')
text = WIDGET_TEXT(base, XSIZE=20)
button3 = WIDGET_BUTTON(base, VALUE='Done', UVALUE='DONE')
WIDGET_CONTROL, base, SET_UVALUE=text
WIDGET_CONTROL, base, /REALIZE
XMANAGER, 'Widget2', base
END